package com.shenjinzheng.dk.user;


import com.shenjinzheng.dk.common.Result;
import com.shenjinzheng.dk.user.entity.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author shenjinzheng
 */
@Component
@FeignClient(
        name = "dk-user-service",
        contextId = "dk-user-service"
)
public interface UserInfoClient {
    @PostMapping("userInfo")
    Result<Object> save(@RequestBody UserInfo userInfo);

    @GetMapping("userInfoApi/{id}")
    UserInfo getInfoById(@PathVariable("id") String id);
}
